package org.qiyu.live.im.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.qiyu.live.im.interfaces.ImTokenRpc;
import org.qiyu.live.im.provider.service.ImTokenServer;

/**
 * @Description: //todo
 * @Author: 张广焱
 * @Date: 2024-05-02 下午6:59
 */
@DubboService
public class ImTokenRpcImpl implements ImTokenRpc {
    @Resource
    private ImTokenServer imTokenServer;

    @Override
    public String createImLoginToken(long userId, int appId) {
        return imTokenServer.createImLoginToken(userId, appId);
    }

    @Override
    public Long getUserIdByToken(String token) {
        return imTokenServer.getUserIdByToken(token);
    }
}
